package top.mcwebsite.playandroid.business.gongzhonghao.impl.vm

import top.mcwebsite.playandroid.business.articles.api.model.ArticleModel
import top.mcwebsite.playandroid.business.gongzhonghao.impl.model.ChapterModel
import top.mcwebsite.playandroid.lib.mvi.base.IIntent
import top.mcwebsite.playandroid.lib.mvi.base.IUiEffect
import top.mcwebsite.playandroid.lib.mvi.base.IUiState
import top.mcwebsite.playandroid.lib.mvi.model.Async

data class GongZhongHaoUiState(
    val gongZhongHaoItems: Async<List<ChapterModel>> = Async.UnInitialization,
    val selectedItem: Int = 0,
) : IUiState

sealed interface GongZhongHaoIntent : IIntent {
    data class ClickTabItemIntent(val index: Int) : GongZhongHaoIntent
    data class PageScrollChangedIntent(val index: Int) : GongZhongHaoIntent
    data class OnClickArticleItemIntent(val articleModel: ArticleModel) : GongZhongHaoIntent

}

sealed interface GongZhongHaoUiEffect : IUiEffect {
    data class NavigationToArticleDetailPageUiEffect(val articleModel: ArticleModel) : GongZhongHaoUiEffect
}